package com.sacfa.proveedores.sql;

public class ProveedorSQL {
	public static final String INSERT;
	public static final String UPDATE;
	public static final String SELECT_ONE;
	public static final String SELECT_ALL;
	public static final String DELETE;
	
	static {
		StringBuilder qryBuilder = new StringBuilder();

	    qryBuilder = new StringBuilder();
	    qryBuilder.append("INSERT INTO Proveedor VALUES(null, ?,?,?,?,?,?,?,?,?)");
	    INSERT = qryBuilder.toString();
	        
	    qryBuilder = new StringBuilder();
	    qryBuilder.append("UPDATE Proveedor set RazonSocial = ?, Nombre = ?, ApellidoPaterno = ?, ");
	    	qryBuilder.append("ApellidoMaterno = ?, Direccion = ?, Credito = ?, Banco = ?, NumeroDeCuenta = ?, ");
	        qryBuilder.append("RFC = ? WHERE idProveedor = ?");
	    UPDATE = qryBuilder.toString();
	        
	    qryBuilder.append("SELECT * FROM Proveedor WHERE idProveedor = ?");
	    SELECT_ONE = qryBuilder.toString();

	    qryBuilder = new StringBuilder();
	    qryBuilder.append("SELECT * FROM Proveedor");
	    SELECT_ALL = qryBuilder.toString();
	        
	    qryBuilder = new StringBuilder();
	    qryBuilder.append("DELETE FROM Proveedor WHERE idProveedor = ?");
	    DELETE = qryBuilder.toString();
	}
}
